<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="main"/>
    <title>Corpus List</title>

  <!-- Combo-handled YUI CSS files: -->
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.7.0/build/datatable/assets/skins/sam/datatable.css&2.7.0/build/treeview/assets/skins/sam/treeview.css">
<!-- Combo-handled YUI JS files: -->
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.7.0/build/yahoo-dom-event/yahoo-dom-event.js&2.7.0/build/element/element-min.js&2.7.0/build/datasource/datasource-min.js&2.7.0/build/datatable/datatable-min.js&2.7.0/build/treeview/treeview-min.js"></script>

</head>
<body class="yui-skin-sam">
<div class="nav">
    <span class="menuButton"><a class="home" href="${createLinkTo(dir: '')}">Home</a></span>
    <span class="menuButton"><g:link class="create" action="create">New Corpus</g:link></span>
</div>
<div class="body">
    <h1>Corpus List</h1>
    <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
    </g:if>
    <div class="list">
        <table>
            <thead>
            <tr>

                <g:sortableColumn property="id" title="Id"/>

                <g:sortableColumn property="name" title="Name"/>

                <g:sortableColumn property="category" title="Category"/>

                <g:sortableColumn property="description" title="Description"/>

                <g:sortableColumn property="dateCreated" title="Date Created"/>

                <g:sortableColumn property="lastUpdated" title="Last Updated"/>

            </tr>
            </thead>
            <tbody>
            <g:each in="${corpusInstanceList}" status="i" var="corpusInstance">
                <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

                    <td><g:link action="show" id="${corpusInstance.id}">${fieldValue(bean: corpusInstance, field: 'id')}</g:link></td>

                    <td>${fieldValue(bean: corpusInstance, field: 'name')}</td>

                    <td>${fieldValue(bean: corpusInstance, field: 'category')}</td>

                    <td>${fieldValue(bean: corpusInstance, field: 'description')}</td>

                    <td>${fieldValue(bean: corpusInstance, field: 'dateCreated')}</td>

                    <td>${fieldValue(bean: corpusInstance, field: 'lastUpdated')}</td>

                </tr>
            </g:each>
            </tbody>
        </table>
    </div>
    <div class="paginateButtons">
        <g:paginate total="${corpusInstanceTotal}"/>
    </div>

</div>
</body>
</html>
